import service from '../service'

export const getMerchantList = params => {
  return service({
    url: 'api/merchants/list',
    method: "get",
    params: params
  });
};

export const updateMerchant = params => {
  return service({
    url: 'api/merchants/update',
    method: "post",
    params: params
  });
};


export const createMerchant = params => {
  return service({
    url: 'api/merchants/create',
    method: "post",
    params: params
  });
}

export const getMerchantChannel = params => {
  return service({
    url: 'api/merchants/channel',
    method: "get",
    params
  });
};

export const getMerchantChannelBanks = params => {
  return service({
    url: 'api/merchants/channel/banks',
    method: "get",
    params
  });
};

export const saveMerchantChannel = data => {
  return service({
    url: 'api/merchants/channel/banks/save',
    method: "post",
    data
  });
};